/**
 * 删除构建文件，即 './dist-out' 目录下所有的文件
 */

const path = require('path')
const findRemoveSync = require('find-remove')

function deleteFile() {
    var src = `${path.resolve(process.cwd(), './dist-out').replace(/\\/g, '/')}`
    console.info(`目标目录：${src}`)

    var result = findRemoveSync(src, { extensions: ['.js', '.css'] })
    console.info(`删除结果：`, result)
}

console.info(`del 开始 【${new Date().toLocaleTimeString()}】`)

deleteFile()

console.info(`del 结束 【${new Date().toLocaleTimeString()}】`)